package com.zbest.zpay.acctrans.enums;

public enum TxMod {

	TX_MOD_H("H", "冻结"),
	TX_MOD_U("U", "解冻"),
	TX_MOD_DC("DC", "借贷"),
	TX_MOD_UDC("UDC", "解冻借贷 "),
	TX_MOD_DCH("DCH", "借贷冻结"),;

	/** 代号 */
	private String code;

	/** 描述 */
	private String desc;

	private TxMod(String type, String desc) {
		this.code = type;
		this.desc = desc;
	}

	/**
	 * 通过代号获取对象
	 * 
	 * @param code
	 * @return
	 */
	public static boolean isDefineByCode(String code) {
		for (TxMod resp : TxMod.values()) {
			if (resp.getCode().equals(code)) {
				return true;
			}
		}
		return false;
	}

	public String getCode() {
		return code;
	}

	public String getMessage() {
		return desc;
	}

}
